<?php
class examinationAction extends apiAction
{
    public function _initialize() {
		parent::_initialize();
    }
	public function index() {
		$id = $this->_get('id','intval',1);//默认id 为 1
		//判断id 是否存在
		$map['status'] = 1;
		$map['class_list_id'] = $id;
		if(D('daka_class_test')->where($map)->find()){
			$this->assign('id',$id);
			$tmp_data = $this->fetch();
			//写入静态文件里面
			_tmp_write($tmp_data);
			$this->display();
		}else{
			//访问了一个不存在的id
			echo 'error';die;
		}
    }
}
